/**
 * 
 */
package com.java.service.impl;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.java.entity.Users;

import com.java.mapper.UsersMapper;
import com.java.service.UsersService;

/**
* @author Kidney
* 创建时间：2019年4月26日 上午1:21:51
* Description:
*/
/**
 * @author KIDNEY
 *
 */
@Service("UserServiceImpl")
public class UserServiceImpl implements UsersService {

	@Autowired
	private UsersMapper um;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.java.service.UsersService#selectByPrimaryKey(java.lang.Integer)
	 */


	/* (non-Javadoc)
	 * @see com.java.service.UsersService#login(java.lang.Integer, java.lang.String)
	 */
	@Override
	public Users login(String username, String password) {
		// TODO Auto-generated method stub
		
		Users user = um.selectByName(username);
		return user;
	}

	/* (non-Javadoc)
	 * @see com.java.service.UsersService#updatePassword(java.lang.String)
	 */


	/* (non-Javadoc)
	 * @see com.java.service.UsersService#selectByPrimaryKey(com.java.entity.Users)
	 */
	@Override
	public Integer updatePassword(Users user) {
		// TODO Auto-generated method stub
		return um.updateByPrimaryKeySelective(user);
	}

	/* (non-Javadoc)
	 * @see com.java.service.UsersService#updatePassword(java.lang.String)
	 */


	/* (non-Javadoc)
	 * @see com.java.service.UsersService#updatePassword(java.lang.String)
	 */


	
	
	
	

}
